import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
import 'package:top_foundation/utils/theme/button.dart';
import 'package:top_foundation/utils/theme/theme.dart';
import 'package:whale/helper/utils/popup/index.dart';
import 'package:whale/helper/utils/util.dart';

/// hello
class NoticeView extends StatelessWidget {
  const NoticeView({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: () async {
        Get.back();
        final action =
            await Popup.alert(msg: '2024年5月25日会议室901待审批', sureText: '审批');
        if (action) {
          Get.snackbar('审批', '会议室901审批通过');

          // Hud.toast('审批通过');
        }
      },
      child: Card(
        child: AspectRatio(
          aspectRatio: 3.0,
          child: Container(
            padding: EdgeInsets.all(10.r),
            child: Stack(
              children: [
                Align(
                  alignment: Alignment.centerRight,
                  child: LottieBuilder.asset(
                    'assets/jsons/office_bg.json',
                    fit: BoxFit.contain,
                  ),
                ),
                Column(
                  crossAxisAlignment: CrossAxisAlignment.start,
                  children: [
                    Row(
                      children: [
                        Row(
                          children: [
                            LottieBuilder.asset(
                              'assets/jsons/email_msg.json',
                              width: 40.r,
                              height: 40.r,
                              fit: BoxFit.contain,
                            ),
                            const SizedBox(width: 10),
                            Text(
                              '您有一条工作提醒',
                              style: ITheme.text.titleMedium,
                            ),
                          ],
                        )
                      ],
                    ),
                    const SizedBox(height: 10),
                    Padding(
                      padding: EdgeInsets.only(left: 10.r),
                      child: Text(
                        '您有一条待审批消息：\n会议室待审批',
                        style: ITheme.text.content13,
                      ),
                    ),
                    Expanded(child: Container()),
                  ],
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
